package com.max.back.demo.form;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

@Data
public class DrugTypeForm {
    public interface Base {
    }

    public interface Find {
    }

    public interface Gettype {
    }

    public interface Delete {
    }

    public interface Update extends Base {
    }

    @NotBlank(groups = {Base.class, Update.class, Delete.class},message = "药品类别编号不能为空")
    @Length(max = 36, groups = {Base.class, Update.class, Delete.class},message = "药品类别编号长度要小于36")
    private String id;
    @NotBlank(groups = {Base.class, Update.class},message = "药品类别名不能为空")
    @Length(max = 100, groups = {Base.class, Update.class},message = "药品类别名长度要小于100")
    private String name;
    @NotBlank(groups = {Base.class, Update.class, Gettype.class},message = "药品类别说明不能为空")
    @Length(max = 100, groups = {Base.class, Update.class, Gettype.class},message = "药品类别说明长度要小于100")
    private String spci;
}
